package com.rjwh.dingdong.client.mvp.model.impl;

import com.aishua.lib.task.AsResult;
import com.rjwh.dingdong.client.constant.NetConstant;
import com.rjwh.dingdong.client.mvp.BaseModel;
import com.rjwh.dingdong.client.mvp.BasePresenter;
import com.rjwh.dingdong.client.network.HttpWebService;
import com.rjwh.dingdong.client.network.HttpWebServiceCallBack;

import java.util.HashMap;
import java.util.Map;

/**
 * 项目名称：whrjwh-parent
 * 类描述：
 * 创建人：wby
 * 创建时间：2016/7/13 16:53
 * 修改人：wby
 * 修改时间：2016/7/13 16:53
 * 修改备注：
 *
 */
public class DownloadUpdateModel extends BaseModel implements  HttpWebServiceCallBack {


    public DownloadUpdateModel(BasePresenter basePresenter) {
        super(basePresenter);
    }

    public void getServerData(String data){
        Map<String, String> params = new HashMap<String, String>();
        params.put("data", data);
        HttpWebService.getDataFromServer(NetConstant.COMPAREVERSION, params, true, this);
    }
    @Override
    public void onServerDataAcquired(int businessType, AsResult mAsResult, boolean isRefresh) {
        if(getBasePresenter()!= null)getBasePresenter().onServerDataAcquired(businessType, mAsResult, isRefresh);
    }
}
